﻿namespace PagedList
{
    using System;
    using System.Runtime.CompilerServices;

    public class PagedListMetaData : IPagedList
    {
        protected PagedListMetaData()
        {
        }

        public PagedListMetaData(IPagedList pagedList)
        {
            this.PageCount = pagedList.PageCount;
            this.TotalItemCount = pagedList.TotalItemCount;
            this.PageIndex = pagedList.PageIndex;
            this.PageNumber = pagedList.PageNumber;
            this.PageSize = pagedList.PageSize;
            this.HasPreviousPage = pagedList.HasPreviousPage;
            this.HasNextPage = pagedList.HasNextPage;
            this.IsFirstPage = pagedList.IsFirstPage;
            this.IsLastPage = pagedList.IsLastPage;
            this.FirstItemOnPage = pagedList.FirstItemOnPage;
            this.LastItemOnPage = pagedList.LastItemOnPage;
        }

        public int FirstItemOnPage { get; protected set; }

        public bool HasNextPage { get; protected set; }

        public bool HasPreviousPage { get; protected set; }

        public bool IsFirstPage { get; protected set; }

        public bool IsLastPage { get; protected set; }

        public int LastItemOnPage { get; protected set; }

        public int PageCount { get; protected set; }

        public int PageIndex { get; protected set; }

        public int PageNumber { get; protected set; }

        public int PageSize { get; protected set; }

        public int TotalItemCount { get; protected set; }
    }
}

